import {INCREMENT, DECREMENT, INCREMENT5} from '../actionType/counter.action.type'

const initialState = {
  count: 6
}


export default (state = initialState, action) => {
  console.log(action)
  switch (action.type){
    case INCREMENT: 
       return {
         count: state.count + 1
       }
    case INCREMENT5: 
       return {
         count: state.count + action.payload
       }
    case DECREMENT:
      return {
        count: state.count - 1
      }
    default: 
      return state
  }
}